import request from '../util/request'

//添加父级参数
export function addSpe(data) {
    return request.post(`/specification`, data);
}


//查找所有的父级参数
export function getSpe() {
    return request.get(`/specification`);
}

//查找所有子级参数
export function getSpechild() {
    return request.get(`/specification/spechild`);
}

//添加子级参数
export function addSpechild(data) {
    return request.post(`/specification/spechild`, data);
}

//伪删除父类参数
export function deleteSpe(id) {
    return request.delete(`/specification/${id}`);

}
//伪删除子类参数
// [HttpDelete, Route("spechild")]
export function deleteSpeChild(data) {
    return request.post(`/specification/delete`,data);

}

//编辑父类参数
export function editSpe(data) {
    return request.put(`/specification`,data);
}

//通过商品Id查找Spe
// FontCommSpeController
export function getSpebyCoId(id) {
    return request.get(`/fontCommSpe/${id}`);
}

//通过商品传入的子分类ID串查找
// [HttpPost,Route("newskubyid")]
export function getSpebyCoIdsku(data) {
    return request.post(`/fontCommSpe/newskubyid`,data);
}